//
//  KKPhotosManager+Private.h
//  KKPhotosKitDemo
//
//  Created by liaozhenming on 2017/8/31.
//  Copyright © 2017年 liaozhenming. All rights reserved.
//
//  私有方法-推荐公开使用
#import "KKPhotosManager.h"

static NSString *KKPhotosManager_Event_Save_Notification = @"KKPhotosManager_Event_Save_Notification";
static NSString *KKPhotosManager_Event_Cancel_Notification = @"KKPhotosManager_Event_Cancel_Notification";

typedef void(^KKPhotosManagerEventBlockHandle)();       //权限事件回调
typedef void(^KKPhotosManagerImageResultBlockHandle)(UIImage* image);       //  获取单个图片Image回调
typedef void(^KKPhotosManagerImageDatasResultBlockHandle)(NSArray* imageDatas);  //  获取图片Data组回调
typedef void(^KKPhotosManagerImagesResultBlockHandle)(NSArray* imageDatas);  //  获取图片Image组回调

@interface KKPhotosManager (Private)
//  获取相机权限
- (BOOL)kk_authStatusWithCamera:(KKPhotosManagerEventBlockHandle)eventBlock;
//  获取相册权限
- (BOOL)kk_authStatusWithLibrary:(KKPhotosManagerEventBlockHandle)eventBlock;
//  显示错误消息
- (void)kk_showErrorMessage:(NSString*)mesage;
// 获取根视图
- (UIViewController*)kk_rootViewController;

//  获取缩率图
+ (void)kk_getThumbImageForAsset:(PHAsset*)asset targetSize:(CGSize)size resultHandle:(KKPhotosManagerImageResultBlockHandle)resultHandle;

//  获取图片Data组
+ (void)kk_getImageDatasForAssets:(NSArray*)assets original:(BOOL)original resultHandle:(KKPhotosManagerImageDatasResultBlockHandle)resultHandle;

//  获取图片Image组
+ (void)kk_getImagesForAssets:(NSArray*)assets original:(BOOL)original resultHandle:(KKPhotosManagerImagesResultBlockHandle)resultHandle;

//  获取主题颜色
+ (UIColor*)kk_getMainColor;
@end

#pragma mark - 相册群组 Class
@interface _KKPhotosGroupItem : NSObject
@property (nonatomic, strong) PHAssetCollection *kk_assetCollection;
@property (nonatomic, assign) NSInteger kk_count;
@property (nonatomic, strong) PHAsset *kk_firstItem;
- (instancetype)initWithAssetCollection:(PHAssetCollection *)assetCollection withItemCounts:(NSInteger)counts;
@end

#pragma mark - 相册item Class
@interface _KKPhotosItem : NSObject
@end

#pragma mark - _KKPhotosDataManger Class
@interface _KKPhotosDataManger : NSObject
+ (instancetype)manager;

@property (nonatomic, assign) NSInteger itemMaxCount;           /**<允许选择的最大值*/
@property (nonatomic, strong) NSMutableArray *arr_photoItems;   /**<已选择的对象数组*/

- (BOOL)kk_isEqualItem:(PHAsset*)asset;

- (void)kk_addItem:(PHAsset*)asset;

- (void)kk_removeItem:(PHAsset*)asset;
@end


#pragma mark - PHAsset(KKPhotosManager) Class
@interface PHAsset(KKPhotosManager)
@property (nonatomic, strong) UIImage *kk_thumbImage;   /**<缩略图*/
@end
